{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import java.util.LinkedHashMap;\n",
    "import java.util.List;\n",
    "import java.util.Map;\n",
    "import java.util.Random;\n",
    "import java.util.function.Supplier;\n",
    "import java.util.stream.Stream;\n",
    "\n",
    "TableDisplay.setLoadingMode(TableDisplayLoadingMode.ENDLESS);\n",
    "\n",
    "Stream<Map<String, Object>> s1 = Stream.generate(new Supplier<Map<String, Object>>() {\n",
    "      Random random = new Random();\n",
    "      int index = 0;\n",
    "      @Override\n",
    "      public Map<String, Object> get() {\n",
    "        return new LinkedHashMap<String, Object>() {\n",
    "          {\n",
    "            put(\"str1\", index++);\n",
    "            put(\"str2\", random.nextFloat());\n",
    "            put(\"str3\", random.nextInt());\n",
    "          }\n",
    "        };\n",
    "      }\n",
    "    });\n",
    "new TableDisplay(s1);"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Java11",
   "language": "java",
   "name": "java11"
  },
  "language_info": {
   "codemirror_mode": "text/x-java",
   "file_extension": ".java",
   "mimetype": "",
   "name": "Java11",
   "nbconverter_exporter": "",
   "version": "11.0.1-internal"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": false,
   "sideBar": false,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": false,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
